package com.tjetc.dao;

import com.tjetc.pojo.dto.CheckInDTO;
import com.tjetc.pojo.entity.Room;

import java.util.List;

/**
 * @Author: itda
 * @Date: 2024/5/10 18:46
 * @Description: RoomDao
 */
public interface RoomDao {
    /**
     * 新增房间信息
     * @param room
     */
    void save(Room room) throws Exception;

    /**
     * 根据id删除房间信息
     * @param id
     */
    void deleteById(Long id) throws Exception;

    /**
     * 根据id修改房间信息
     * @param room
     */
    void update(Room room) throws Exception;

    /**
     * 查看房间信息
     * @return
     */
    List<Room> list() throws Exception;

    /**
     * 根据id查询房间信息
     * @param id
     * @return
     */
    Room getById(Long id) throws Exception;

    /**
     * 根据酒店id删除关联的房间信息
     * @param hotelId
     */
    void deleteByHotelId(Long hotelId) throws Exception;

    /**
     * 根据房间状态查询房间信息
     * @param status
     * @return
     */
    List<Room> getByStatus(int status) throws Exception;

    /**
     * 根据id修改房间状态
     * @param roomId
     * @param availability
     */
    void updateStatusById(Long roomId, Short availability) throws Exception;

    /**
     * 办理入住
     * @param checkInDTO
     */
    void checkIn(CheckInDTO checkInDTO) throws Exception;
}
